import request from '@/utils/request'
import { getHost, getHeaderType } from '@/utils/host'

export function getPageSlideShow(data) {
  return request({
    method: 'post',
    url: '/slideshow/getPageSlideShow',
    baseURL: getHost(),
    data: data,
    headers: getHeaderType()
  })
}

export function saveSlideShow(data) {
  return request({
    method: 'post',
    url: '/slideshow/saveSlideShow',
    baseURL: getHost(),
    data: data,
    headers: getHeaderType()
  })
}

export function updateSlideShow(data) {
  return request({
    method: 'post',
    url: '/slideshow/updateSlideShow',
    baseURL: getHost(),
    data: data,
    headers: getHeaderType()
  })
}

export function getSlideShowById(id) {
  return request({
    method: 'get',
    url: '/slideshow/getSlideShowById',
    baseURL: getHost(),
    params: { id: id },
    headers: getHeaderType()
  })
}

export function delSlideShow(id) {
  return request({
    method: 'post',
    url: '/slideshow/delSlideShow',
    baseURL: getHost(),
    params: { id: id },
    headers: getHeaderType()
  })
}
